/**
 * @Title: RemoteType.java
 * @author 7828wc
 * @date 2015年8月7日 下午3:56:53
 */
package com.onstar.cn.mag.enumtype;

/**
 * @ClassName: RemoteCommandsType
 * @Description: Vehicle commands are executed one at a time. Requests will be
 *               queued if sequential calls are made without waiting for
 *               confirmation on the previous request. Execution times for
 *               requests that are queued may be longer than a single request.
 * @author 7828wc
 * @date 2015年8月7日 下午3:56:53
 */
public enum RemoteCommandsType {
    /**
     * This async service provides the ability to remotely start the vehicle
     */
    COMMANDS_START("start"),
    /**
     * This async service provides the ability to turn off a vehicle after a
     * previous remote start
     */
    COMMANDS_CANCEL_START("cancelStart"),
    /**
     * This async service provides the ability to remotely lock the doors
     */
    COMMANDS_LOCK_DOOR("lockDoor"),
    /**
     * This async service provides the ability to remotely unlock the doors.
     */
    COMMANDS_UNLOCK_DOOR("unlockDoor"),
    /**
     * This async service provides the lat/long of the current location of the
     * vehicle
     */
    COMMANDS_LOCATION("location"), COMMANDS_GEOFENCE_LOCATION("location"),
    /**
     * This async service provides the ability to send vehicle alert requests to
     * a vehicle to honk horn and/or flash lights based on user requirements.
     */
    COMMANDS_ALERT("alert"),
    /**
     * This async service provides the ability to send directions based on a
     * given destination and a start location
     */
    COMMANDS_TBT_ROUTE("sendTBTRoute"),
    /**
     * This async service provides the ability to send a destination to a nav
     * unit.
     */
    COMMANDS_NAV_DESTINATION("sendNavDestination"),

    COMMANDS_DIAGNOSTICS("diagnostics"),

    COMMANDS_HISTROY("history"),

    COMMAND_USER_HELP("userHelp"),

    /**
     * wifi command
     */
//    COMMAND_SETHOTSPOTINFO("setHotspotInfo"),
    COMMAND_SETHOTSPOTINFO("setInfo"),

    COMMAND_DISABLEHOTSPOT("disable"),

    COMMAND_ENSABLEHOTSPOT("enable"),

    COMMAND_GETHOTSPOTSTATUS("getStatus"),

//    COMMAND_GETHOTSPOTINFO("getHotspotInfo"),
    COMMAND_GETHOTSPOTINFO("getInfo"),

    /**
     * phev
     */
    COMMAND_SETCOMMUTESCHEDULE("setCommuteSchedule"),

    COMMAND_GETCOMMUTESCHEDULE("getCommuteSchedule"),

    COMMAND_SETCHARGINGPROFILE("setChargingProfile"),

    COMMAND_GETCHARGINGPROFILE("getChargingProfile"),

    COMMAND_CHARGEOVERRIDE("chargeOverride"),

    COMMAND_STOPFASTCHARGE("stopFastCharge"),

    COMMAND_CREATETRIPPLAN("createTripPlan"),

    /**
     * short cut go home/company
     */
    COMMAND_GO_HOME("goHome"),
    COMMAND_GO_COMPANY("goCompany");

    private final String value;

    RemoteCommandsType(String v) {
        value = v;
    }

    public String value() {
        return value;
    }

    public static RemoteCommandsType fromValue(String v) {
        for (RemoteCommandsType c : RemoteCommandsType.values()) {
            if (c.value.equals(v)) {
                return c;
            }
        }
        //throw new IllegalArgumentException(v);
        return null;
    }
}
